const deezerApi = require('deezer-request2');

const getAlbumTracks = async (id) => {
  let { data } = await deezerApi.getAlbumTracks(id);
  return data.results.data.map((track, index) => {
    track.TRACK_POSITION = index + 1;
    return track;
  });
};

module.exports = getAlbumTracks;
